import instance from '../utils/request'

//忘记密码
// 邮箱验证
export const emailVerification = data => {
    const {
        email,
        captcha,
    } = data
    return instance({
        url: '/forgetPassword',
        method: 'POST',
        data: {
            email,
            captcha,
        },
        headers: {
            'Content-Type': 'application/json'
          },
    })
}

// 修改密码
export const updatePassword = data => {
    const {
        password,
    } = data
    return instance({
        url: '/updatePassword',
        method: 'PUT',
        data: {
            password,
        },
        headers: {
            'Content-Type': 'application/json'
          },
    })
}